.class final Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;
.super Ljava/lang/Thread;
.source "ImageMixUtil.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil;->mix(Landroid/content/Context;Landroid/graphics/Bitmap;Ljava/util/List;Ljava/lang/String;Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$filePath:Ljava/lang/String;

.field final synthetic val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

.field final synthetic val$photo:Landroid/graphics/Bitmap;

.field final synthetic val$pic:Landroid/graphics/Bitmap;


# direct methods
.method constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;Landroid/graphics/Bitmap;)V
    .registers 5

    .prologue
    .line 108
    iput-object p1, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$filePath:Ljava/lang/String;

    iput-object p2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$pic:Landroid/graphics/Bitmap;

    iput-object p3, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

    iput-object p4, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$photo:Landroid/graphics/Bitmap;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .registers 6

    .prologue
    .line 111
    :try_start_0
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$filePath:Ljava/lang/String;

    iget-object v3, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$pic:Landroid/graphics/Bitmap;

    const/16 v4, 0x64

    invoke-static {v2, v3, v4}, Lcom/zuiapps/suite/utils/image/ImageUtils;->saveImageToSD(Ljava/lang/String;Landroid/graphics/Bitmap;I)V

    .line 112
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

    if-eqz v2, :cond_14

    .line 113
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

    iget-object v3, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$filePath:Ljava/lang/String;

    invoke-interface {v2, v3}, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;->postCallback(Ljava/lang/String;)V
    :try_end_14
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_14} :catch_26
    .catchall {:try_start_0 .. :try_end_14} :catchall_46

    .line 121
    :cond_14
    iget-object v1, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$pic:Landroid/graphics/Bitmap;

    .line 122
    .local v1, "finalPic":Landroid/graphics/Bitmap;
    if-eqz v1, :cond_25

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v2

    if-nez v2, :cond_25

    .line 123
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$photo:Landroid/graphics/Bitmap;

    if-eq v1, v2, :cond_25

    .line 124
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    .line 129
    :cond_25
    :goto_25
    return-void

    .line 115
    .end local v1    # "finalPic":Landroid/graphics/Bitmap;
    :catch_26
    move-exception v0

    .line 116
    .local v0, "e":Ljava/io/IOException;
    :try_start_27
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    .line 117
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

    if-eqz v2, :cond_34

    .line 118
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$mixCallback:Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;

    const/4 v3, 0x0

    invoke-interface {v2, v3}, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$MixCallback;->postCallback(Ljava/lang/String;)V
    :try_end_34
    .catchall {:try_start_27 .. :try_end_34} :catchall_46

    .line 121
    :cond_34
    iget-object v1, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$pic:Landroid/graphics/Bitmap;

    .line 122
    .restart local v1    # "finalPic":Landroid/graphics/Bitmap;
    if-eqz v1, :cond_25

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v2

    if-nez v2, :cond_25

    .line 123
    iget-object v2, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$photo:Landroid/graphics/Bitmap;

    if-eq v1, v2, :cond_25

    .line 124
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    goto :goto_25

    .line 121
    .end local v0    # "e":Ljava/io/IOException;
    .end local v1    # "finalPic":Landroid/graphics/Bitmap;
    :catchall_46
    move-exception v2

    iget-object v1, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$pic:Landroid/graphics/Bitmap;

    .line 122
    .restart local v1    # "finalPic":Landroid/graphics/Bitmap;
    if-eqz v1, :cond_58

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v3

    if-nez v3, :cond_58

    .line 123
    iget-object v3, p0, Lcom/zuiapps/suite/utils/image/mix/ImageMixUtil$1;->val$photo:Landroid/graphics/Bitmap;

    if-eq v1, v3, :cond_58

    .line 124
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    .line 128
    :cond_58
    throw v2
.end method
